/** @namespace app.model.UserProject */
module.exports = app => {
  const {TINYINT, INTEGER} = app.Sequelize;

  const UserProject = app.model.define('user_project', {
    id: {
      type: INTEGER.UNSIGNED,
      primaryKey: true,
      autoIncrement: true,
    },
    //type,项目的用户级别，0 项目负责人，1 项目执行人，2 用户
    type: {type: TINYINT(1).UNSIGNED, defaultValue: 1},
    //用户自行设置是否接收这个项目的每日日志邮件
    email: {type: TINYINT(1).UNSIGNED, defaultValue: 1},
  }, {timestamps: false});

  return UserProject;
};